home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 4
/
Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso
/
Science
/
RLaB
/
toolbox
/
rem.r
< prev
next >
Wrap
Text File
|
1994-04-25
|
458b
|
18 lines
//-------------------------------------------------------------------//
//
// Syntax: rem ( A, B )
// Description:
// Calculate remainders.
// `mod ( A, B )' is equivilant to `rem ( A, B)'. Mod is a builtin
// function, and is much faster when operating on matrices. Rem is
// provided mostly for MATLAB compatibility.
//-------------------------------------------------------------------//
rem = function(x,y)
{
return (x-y.*int(x./y));
};